home *** CD-ROM | disk | FTP | other *** search
/ ADA Programming Guide / ADA Programming Guide.iso / ada_gnu / include / sys / dirent.h < prev    next >
C/C++ Source or Header  |  1996-01-30  |  1KB  |  50 lines

  1. /* This is file DIRENT.H */
  2. /*
  3. ** Copyright (C) 1991 DJ Delorie, 24 Kirsten Ave, Rochester NH 03867-2954
  4. **
  5. ** This file is distributed under the terms listed in the document
  6. ** "copying.dj", available from DJ Delorie at the address above.
  7. ** A copy of "copying.dj" should accompany this file; if not, a copy
  8. ** should be available from where this file was obtained.  This file
  9. ** may not be distributed without a verbatim copy of "copying.dj".
  10. **
  11. ** This file is distributed WITHOUT ANY WARRANTY; without even the implied
  12. ** warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  13. */
  14.  
  15. #ifndef _dirent_h_
  16. #define _dirent_h_
  17.  
  18. #include <dir.h>
  19.  
  20. #define MAXNAMLEN 13
  21.  
  22. struct dirent {
  23.   unsigned short d_namlen;
  24.   char           d_name[MAXNAMLEN+1];
  25. };
  26.  
  27. typedef struct {
  28.   int num_read;
  29.   char *name;
  30.   struct ffblk ff;
  31.   struct dirent de;
  32. } DIR;
  33.  
  34. #ifdef __cplusplus
  35. extern "C" {
  36. #endif
  37.  
  38. DIR *opendir(char *name);
  39. struct dirent *readdir(DIR *dir);
  40. long telldir(DIR *dir);
  41. void seekdir(DIR *dir, long loc);
  42. void rewinddir(DIR *dir);
  43. int closedir(DIR *dir);
  44.  
  45. #ifdef __cplusplus
  46. }
  47. #endif
  48.  
  49. #endif
  50.